;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 2.8.0 #5117 (Mar 23 2008) (MINGW32)
; This file was generated Sun Nov 23 13:52:35 2008
;--------------------------------------------------------
	.module eeprom
	.optsdcc -mmcs51 --model-small
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl _spi_read_PARM_2
	.globl _spi_write_PARM_2
	.globl _setup_code_PARM_3
	.globl _setup_code_PARM_2
	.globl _SPI_ISR
	.globl _increment_gps_ptr
	.globl _setup_code
	.globl _EEPROM_SEL
	.globl _LCD_E
	.globl _LCD_RW
	.globl _LCD_RS
	.globl _SPIF
	.globl _WCOL
	.globl _MODF
	.globl _RXOVRN
	.globl _NSSMD1
	.globl _NSSMD0
	.globl _TXBMT
	.globl _SPIEN
	.globl _AD0EN
	.globl _AD0TM
	.globl _AD0INT
	.globl _AD0BUSY
	.globl _AD0WINT
	.globl _AD0CM2
	.globl _AD0CM1
	.globl _AD0CM0
	.globl _CF
	.globl _CR
	.globl _CCF2
	.globl _CCF1
	.globl _CCF0
	.globl _CY
	.globl _AC
	.globl _F0
	.globl _RS1
	.globl _RS0
	.globl _OV
	.globl _F1
	.globl _PARITY
	.globl _TF2H
	.globl _TF2
	.globl _TF2L
	.globl _TF2LEN
	.globl _TF2CEN
	.globl _T2SPLIT
	.globl _TR2
	.globl _T2XCLK
	.globl _MASTER
	.globl _TXMODE
	.globl _STA
	.globl _STO
	.globl _ACKRQ
	.globl _ARBLOST
	.globl _ACK
	.globl _SI
	.globl _PSPI0
	.globl _PT2
	.globl _PS0
	.globl _PS
	.globl _PT1
	.globl _PX1
	.globl _PT0
	.globl _PX0
	.globl _EA
	.globl _ESPI0
	.globl _ET2
	.globl _ES0
	.globl _ES
	.globl _ET1
	.globl _EX1
	.globl _ET0
	.globl _EX0
	.globl _P2_7
	.globl _P2_6
	.globl _P2_5
	.globl _P2_4
	.globl _P2_3
	.globl _P2_2
	.globl _P2_1
	.globl _P2_0
	.globl _S0MODE
	.globl _SM0
	.globl _MCE0
	.globl _SM2
	.globl _REN0
	.globl _REN
	.globl _TB80
	.globl _TB8
	.globl _RB80
	.globl _RB8
	.globl _TI0
	.globl _TI
	.globl _RI0
	.globl _RI
	.globl _P1_7
	.globl _P1_6
	.globl _P1_5
	.globl _P1_4
	.globl _P1_3
	.globl _P1_2
	.globl _P1_1
	.globl _P1_0
	.globl _TF1
	.globl _TR1
	.globl _TF0
	.globl _TR0
	.globl _IE1
	.globl _IT1
	.globl _IE0
	.globl _IT0
	.globl _P0_7
	.globl _P0_6
	.globl _P0_5
	.globl _P0_4
	.globl _P0_3
	.globl _P0_2
	.globl _P0_1
	.globl _P0_0
	.globl _PCA0CP2
	.globl _PCA0CP1
	.globl _PCA0CP0
	.globl _PCA0
	.globl _ADC0LT
	.globl _ADC0GT
	.globl _ADC0
	.globl _IDA0
	.globl _TMR3RL
	.globl _TMR3
	.globl _TMR2RL
	.globl _RCAP2
	.globl _TMR2
	.globl _TMR1
	.globl _TMR0
	.globl _VDM0CN
	.globl _PCA0CPH0
	.globl _PCA0CPL0
	.globl _PCA0H
	.globl _PCA0L
	.globl _SPI0CN
	.globl _EIP1
	.globl _P1MDIN
	.globl _P1MODE
	.globl _P0MDIN
	.globl _P0MODE
	.globl _B
	.globl _RSTSRC
	.globl _PCA0CPH2
	.globl _PCA0CPL2
	.globl _PCA0CPH1
	.globl _PCA0CPL1
	.globl _ADC0CN
	.globl _EIE1
	.globl _INT01CF
	.globl _IT01CF
	.globl _OSCLCN
	.globl _XBR1
	.globl _XBR0
	.globl _ACC
	.globl _PCA0CPM2
	.globl _PCA0CPM1
	.globl _PCA0CPM0
	.globl _PCA0MD
	.globl _PCA0CN
	.globl _P1SKIP
	.globl _P0SKIP
	.globl _REF0CN
	.globl _PSW
	.globl _TMR2H
	.globl _TH2
	.globl _TMR2L
	.globl _TL2
	.globl _TMR2RLH
	.globl _RCAP2H
	.globl _TMR2RLL
	.globl _RCAP2L
	.globl _TMR2CN
	.globl _T2CON
	.globl _ADC0LTH
	.globl _ADC0LTL
	.globl _ADC0GTH
	.globl _ADC0GTL
	.globl _SMB0DAT
	.globl _SMB0CF
	.globl _SMB0CN
	.globl _ADC0H
	.globl _ADC0L
	.globl _ADC0CF
	.globl _AMX0P
	.globl _AMX0N
	.globl _IDA0CN
	.globl _IP
	.globl _FLKEY
	.globl _FLSCL
	.globl _OSCICL
	.globl _OSCICN
	.globl _OSCXCN
	.globl __XPAGE
	.globl _EMI0CN
	.globl _CLKSEL
	.globl _IE
	.globl _P2MDOUT
	.globl _P1MDOUT
	.globl _P0MDOUT
	.globl _SPI0DAT
	.globl _SPI0CKR
	.globl _SPI0CFG
	.globl _P2
	.globl _CPT0MX
	.globl _CPT0MD
	.globl _CPT0CN
	.globl _SBUF0
	.globl _SBUF
	.globl _SCON0
	.globl _SCON
	.globl _IDA0H
	.globl _IDA0L
	.globl _TMR3H
	.globl _TMR3L
	.globl _TMR3RLH
	.globl _TMR3RLL
	.globl _TMR3CN
	.globl _P1
	.globl _PSCTL
	.globl _CKCON
	.globl _TH1
	.globl _TH0
	.globl _TL1
	.globl _TL0
	.globl _TMOD
	.globl _TCON
	.globl _PCON
	.globl _DPH
	.globl _DPL
	.globl _SP
	.globl _P0
	.globl _spi_dont_care_bytes
	.globl _ep
	.globl _odometer_byte_ptr
	.globl _curr_byte
	.globl _spi_ready
	.globl _init_eeprom
	.globl _save_gps_log
	.globl _save_odometer
	.globl _spi_write
	.globl _spi_read
	.globl _dump_gps
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
	.area RSEG    (DATA)
G$P0$0$0 == 0x0080
_P0	=	0x0080
G$SP$0$0 == 0x0081
_SP	=	0x0081
G$DPL$0$0 == 0x0082
_DPL	=	0x0082
G$DPH$0$0 == 0x0083
_DPH	=	0x0083
G$PCON$0$0 == 0x0087
_PCON	=	0x0087
G$TCON$0$0 == 0x0088
_TCON	=	0x0088
G$TMOD$0$0 == 0x0089
_TMOD	=	0x0089
G$TL0$0$0 == 0x008a
_TL0	=	0x008a
G$TL1$0$0 == 0x008b
_TL1	=	0x008b
G$TH0$0$0 == 0x008c
_TH0	=	0x008c
G$TH1$0$0 == 0x008d
_TH1	=	0x008d
G$CKCON$0$0 == 0x008e
_CKCON	=	0x008e
G$PSCTL$0$0 == 0x008f
_PSCTL	=	0x008f
G$P1$0$0 == 0x0090
_P1	=	0x0090
G$TMR3CN$0$0 == 0x0091
_TMR3CN	=	0x0091
G$TMR3RLL$0$0 == 0x0092
_TMR3RLL	=	0x0092
G$TMR3RLH$0$0 == 0x0093
_TMR3RLH	=	0x0093
G$TMR3L$0$0 == 0x0094
_TMR3L	=	0x0094
G$TMR3H$0$0 == 0x0095
_TMR3H	=	0x0095
G$IDA0L$0$0 == 0x0096
_IDA0L	=	0x0096
G$IDA0H$0$0 == 0x0097
_IDA0H	=	0x0097
G$SCON$0$0 == 0x0098
_SCON	=	0x0098
G$SCON0$0$0 == 0x0098
_SCON0	=	0x0098
G$SBUF$0$0 == 0x0099
_SBUF	=	0x0099
G$SBUF0$0$0 == 0x0099
_SBUF0	=	0x0099
G$CPT0CN$0$0 == 0x009b
_CPT0CN	=	0x009b
G$CPT0MD$0$0 == 0x009d
_CPT0MD	=	0x009d
G$CPT0MX$0$0 == 0x009f
_CPT0MX	=	0x009f
G$P2$0$0 == 0x00a0
_P2	=	0x00a0
G$SPI0CFG$0$0 == 0x00a1
_SPI0CFG	=	0x00a1
G$SPI0CKR$0$0 == 0x00a2
_SPI0CKR	=	0x00a2
G$SPI0DAT$0$0 == 0x00a3
_SPI0DAT	=	0x00a3
G$P0MDOUT$0$0 == 0x00a4
_P0MDOUT	=	0x00a4
G$P1MDOUT$0$0 == 0x00a5
_P1MDOUT	=	0x00a5
G$P2MDOUT$0$0 == 0x00a6
_P2MDOUT	=	0x00a6
G$IE$0$0 == 0x00a8
_IE	=	0x00a8
G$CLKSEL$0$0 == 0x00a9
_CLKSEL	=	0x00a9
G$EMI0CN$0$0 == 0x00aa
_EMI0CN	=	0x00aa
G$_XPAGE$0$0 == 0x00aa
__XPAGE	=	0x00aa
G$OSCXCN$0$0 == 0x00b1
_OSCXCN	=	0x00b1
G$OSCICN$0$0 == 0x00b2
_OSCICN	=	0x00b2
G$OSCICL$0$0 == 0x00b3
_OSCICL	=	0x00b3
G$FLSCL$0$0 == 0x00b6
_FLSCL	=	0x00b6
G$FLKEY$0$0 == 0x00b7
_FLKEY	=	0x00b7
G$IP$0$0 == 0x00b8
_IP	=	0x00b8
G$IDA0CN$0$0 == 0x00b9
_IDA0CN	=	0x00b9
G$AMX0N$0$0 == 0x00ba
_AMX0N	=	0x00ba
G$AMX0P$0$0 == 0x00bb
_AMX0P	=	0x00bb
G$ADC0CF$0$0 == 0x00bc
_ADC0CF	=	0x00bc
G$ADC0L$0$0 == 0x00bd
_ADC0L	=	0x00bd
G$ADC0H$0$0 == 0x00be
_ADC0H	=	0x00be
G$SMB0CN$0$0 == 0x00c0
_SMB0CN	=	0x00c0
G$SMB0CF$0$0 == 0x00c1
_SMB0CF	=	0x00c1
G$SMB0DAT$0$0 == 0x00c2
_SMB0DAT	=	0x00c2
G$ADC0GTL$0$0 == 0x00c3
_ADC0GTL	=	0x00c3
G$ADC0GTH$0$0 == 0x00c4
_ADC0GTH	=	0x00c4
G$ADC0LTL$0$0 == 0x00c5
_ADC0LTL	=	0x00c5
G$ADC0LTH$0$0 == 0x00c6
_ADC0LTH	=	0x00c6
G$T2CON$0$0 == 0x00c8
_T2CON	=	0x00c8
G$TMR2CN$0$0 == 0x00c8
_TMR2CN	=	0x00c8
G$RCAP2L$0$0 == 0x00ca
_RCAP2L	=	0x00ca
G$TMR2RLL$0$0 == 0x00ca
_TMR2RLL	=	0x00ca
G$RCAP2H$0$0 == 0x00cb
_RCAP2H	=	0x00cb
G$TMR2RLH$0$0 == 0x00cb
_TMR2RLH	=	0x00cb
G$TL2$0$0 == 0x00cc
_TL2	=	0x00cc
G$TMR2L$0$0 == 0x00cc
_TMR2L	=	0x00cc
G$TH2$0$0 == 0x00cd
_TH2	=	0x00cd
G$TMR2H$0$0 == 0x00cd
_TMR2H	=	0x00cd
G$PSW$0$0 == 0x00d0
_PSW	=	0x00d0
G$REF0CN$0$0 == 0x00d1
_REF0CN	=	0x00d1
G$P0SKIP$0$0 == 0x00d4
_P0SKIP	=	0x00d4
G$P1SKIP$0$0 == 0x00d5
_P1SKIP	=	0x00d5
G$PCA0CN$0$0 == 0x00d8
_PCA0CN	=	0x00d8
G$PCA0MD$0$0 == 0x00d9
_PCA0MD	=	0x00d9
G$PCA0CPM0$0$0 == 0x00da
_PCA0CPM0	=	0x00da
G$PCA0CPM1$0$0 == 0x00db
_PCA0CPM1	=	0x00db
G$PCA0CPM2$0$0 == 0x00dc
_PCA0CPM2	=	0x00dc
G$ACC$0$0 == 0x00e0
_ACC	=	0x00e0
G$XBR0$0$0 == 0x00e1
_XBR0	=	0x00e1
G$XBR1$0$0 == 0x00e2
_XBR1	=	0x00e2
G$OSCLCN$0$0 == 0x00e3
_OSCLCN	=	0x00e3
G$IT01CF$0$0 == 0x00e4
_IT01CF	=	0x00e4
G$INT01CF$0$0 == 0x00e4
_INT01CF	=	0x00e4
G$EIE1$0$0 == 0x00e6
_EIE1	=	0x00e6
G$ADC0CN$0$0 == 0x00e8
_ADC0CN	=	0x00e8
G$PCA0CPL1$0$0 == 0x00e9
_PCA0CPL1	=	0x00e9
G$PCA0CPH1$0$0 == 0x00ea
_PCA0CPH1	=	0x00ea
G$PCA0CPL2$0$0 == 0x00eb
_PCA0CPL2	=	0x00eb
G$PCA0CPH2$0$0 == 0x00ec
_PCA0CPH2	=	0x00ec
G$RSTSRC$0$0 == 0x00ef
_RSTSRC	=	0x00ef
G$B$0$0 == 0x00f0
_B	=	0x00f0
G$P0MODE$0$0 == 0x00f1
_P0MODE	=	0x00f1
G$P0MDIN$0$0 == 0x00f1
_P0MDIN	=	0x00f1
G$P1MODE$0$0 == 0x00f2
_P1MODE	=	0x00f2
G$P1MDIN$0$0 == 0x00f2
_P1MDIN	=	0x00f2
G$EIP1$0$0 == 0x00f6
_EIP1	=	0x00f6
G$SPI0CN$0$0 == 0x00f8
_SPI0CN	=	0x00f8
G$PCA0L$0$0 == 0x00f9
_PCA0L	=	0x00f9
G$PCA0H$0$0 == 0x00fa
_PCA0H	=	0x00fa
G$PCA0CPL0$0$0 == 0x00fb
_PCA0CPL0	=	0x00fb
G$PCA0CPH0$0$0 == 0x00fc
_PCA0CPH0	=	0x00fc
G$VDM0CN$0$0 == 0x00ff
_VDM0CN	=	0x00ff
G$TMR0$0$0 == 0x8c8a
_TMR0	=	0x8c8a
G$TMR1$0$0 == 0x8d8b
_TMR1	=	0x8d8b
G$TMR2$0$0 == 0xcdcc
_TMR2	=	0xcdcc
G$RCAP2$0$0 == 0xcbca
_RCAP2	=	0xcbca
G$TMR2RL$0$0 == 0xcbca
_TMR2RL	=	0xcbca
G$TMR3$0$0 == 0x9594
_TMR3	=	0x9594
G$TMR3RL$0$0 == 0x9392
_TMR3RL	=	0x9392
G$IDA0$0$0 == 0x9796
_IDA0	=	0x9796
G$ADC0$0$0 == 0xbebd
_ADC0	=	0xbebd
G$ADC0GT$0$0 == 0xc4c3
_ADC0GT	=	0xc4c3
G$ADC0LT$0$0 == 0xc6c5
_ADC0LT	=	0xc6c5
G$PCA0$0$0 == 0xfaf9
_PCA0	=	0xfaf9
G$PCA0CP0$0$0 == 0xfcfb
_PCA0CP0	=	0xfcfb
G$PCA0CP1$0$0 == 0xeae9
_PCA0CP1	=	0xeae9
G$PCA0CP2$0$0 == 0xeceb
_PCA0CP2	=	0xeceb
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
	.area RSEG    (DATA)
G$P0_0$0$0 == 0x0080
_P0_0	=	0x0080
G$P0_1$0$0 == 0x0081
_P0_1	=	0x0081
G$P0_2$0$0 == 0x0082
_P0_2	=	0x0082
G$P0_3$0$0 == 0x0083
_P0_3	=	0x0083
G$P0_4$0$0 == 0x0084
_P0_4	=	0x0084
G$P0_5$0$0 == 0x0085
_P0_5	=	0x0085
G$P0_6$0$0 == 0x0086
_P0_6	=	0x0086
G$P0_7$0$0 == 0x0087
_P0_7	=	0x0087
G$IT0$0$0 == 0x0088
_IT0	=	0x0088
G$IE0$0$0 == 0x0089
_IE0	=	0x0089
G$IT1$0$0 == 0x008a
_IT1	=	0x008a
G$IE1$0$0 == 0x008b
_IE1	=	0x008b
G$TR0$0$0 == 0x008c
_TR0	=	0x008c
G$TF0$0$0 == 0x008d
_TF0	=	0x008d
G$TR1$0$0 == 0x008e
_TR1	=	0x008e
G$TF1$0$0 == 0x008f
_TF1	=	0x008f
G$P1_0$0$0 == 0x0090
_P1_0	=	0x0090
G$P1_1$0$0 == 0x0091
_P1_1	=	0x0091
G$P1_2$0$0 == 0x0092
_P1_2	=	0x0092
G$P1_3$0$0 == 0x0093
_P1_3	=	0x0093
G$P1_4$0$0 == 0x0094
_P1_4	=	0x0094
G$P1_5$0$0 == 0x0095
_P1_5	=	0x0095
G$P1_6$0$0 == 0x0096
_P1_6	=	0x0096
G$P1_7$0$0 == 0x0097
_P1_7	=	0x0097
G$RI$0$0 == 0x0098
_RI	=	0x0098
G$RI0$0$0 == 0x0098
_RI0	=	0x0098
G$TI$0$0 == 0x0099
_TI	=	0x0099
G$TI0$0$0 == 0x0099
_TI0	=	0x0099
G$RB8$0$0 == 0x009a
_RB8	=	0x009a
G$RB80$0$0 == 0x009a
_RB80	=	0x009a
G$TB8$0$0 == 0x009b
_TB8	=	0x009b
G$TB80$0$0 == 0x009b
_TB80	=	0x009b
G$REN$0$0 == 0x009c
_REN	=	0x009c
G$REN0$0$0 == 0x009c
_REN0	=	0x009c
G$SM2$0$0 == 0x009d
_SM2	=	0x009d
G$MCE0$0$0 == 0x009d
_MCE0	=	0x009d
G$SM0$0$0 == 0x009f
_SM0	=	0x009f
G$S0MODE$0$0 == 0x009f
_S0MODE	=	0x009f
G$P2_0$0$0 == 0x00a0
_P2_0	=	0x00a0
G$P2_1$0$0 == 0x00a1
_P2_1	=	0x00a1
G$P2_2$0$0 == 0x00a2
_P2_2	=	0x00a2
G$P2_3$0$0 == 0x00a3
_P2_3	=	0x00a3
G$P2_4$0$0 == 0x00a4
_P2_4	=	0x00a4
G$P2_5$0$0 == 0x00a5
_P2_5	=	0x00a5
G$P2_6$0$0 == 0x00a6
_P2_6	=	0x00a6
G$P2_7$0$0 == 0x00a7
_P2_7	=	0x00a7
G$EX0$0$0 == 0x00a8
_EX0	=	0x00a8
G$ET0$0$0 == 0x00a9
_ET0	=	0x00a9
G$EX1$0$0 == 0x00aa
_EX1	=	0x00aa
G$ET1$0$0 == 0x00ab
_ET1	=	0x00ab
G$ES$0$0 == 0x00ac
_ES	=	0x00ac
G$ES0$0$0 == 0x00ac
_ES0	=	0x00ac
G$ET2$0$0 == 0x00ad
_ET2	=	0x00ad
G$ESPI0$0$0 == 0x00ae
_ESPI0	=	0x00ae
G$EA$0$0 == 0x00af
_EA	=	0x00af
G$PX0$0$0 == 0x00b8
_PX0	=	0x00b8
G$PT0$0$0 == 0x00b9
_PT0	=	0x00b9
G$PX1$0$0 == 0x00ba
_PX1	=	0x00ba
G$PT1$0$0 == 0x00bb
_PT1	=	0x00bb
G$PS$0$0 == 0x00bc
_PS	=	0x00bc
G$PS0$0$0 == 0x00bc
_PS0	=	0x00bc
G$PT2$0$0 == 0x00bd
_PT2	=	0x00bd
G$PSPI0$0$0 == 0x00be
_PSPI0	=	0x00be
G$SI$0$0 == 0x00c0
_SI	=	0x00c0
G$ACK$0$0 == 0x00c1
_ACK	=	0x00c1
G$ARBLOST$0$0 == 0x00c2
_ARBLOST	=	0x00c2
G$ACKRQ$0$0 == 0x00c3
_ACKRQ	=	0x00c3
G$STO$0$0 == 0x00c4
_STO	=	0x00c4
G$STA$0$0 == 0x00c5
_STA	=	0x00c5
G$TXMODE$0$0 == 0x00c6
_TXMODE	=	0x00c6
G$MASTER$0$0 == 0x00c7
_MASTER	=	0x00c7
G$T2XCLK$0$0 == 0x00c8
_T2XCLK	=	0x00c8
G$TR2$0$0 == 0x00ca
_TR2	=	0x00ca
G$T2SPLIT$0$0 == 0x00cb
_T2SPLIT	=	0x00cb
G$TF2CEN$0$0 == 0x00cd
_TF2CEN	=	0x00cd
G$TF2LEN$0$0 == 0x00cd
_TF2LEN	=	0x00cd
G$TF2L$0$0 == 0x00ce
_TF2L	=	0x00ce
G$TF2$0$0 == 0x00cf
_TF2	=	0x00cf
G$TF2H$0$0 == 0x00cf
_TF2H	=	0x00cf
G$PARITY$0$0 == 0x00d0
_PARITY	=	0x00d0
G$F1$0$0 == 0x00d1
_F1	=	0x00d1
G$OV$0$0 == 0x00d2
_OV	=	0x00d2
G$RS0$0$0 == 0x00d3
_RS0	=	0x00d3
G$RS1$0$0 == 0x00d4
_RS1	=	0x00d4
G$F0$0$0 == 0x00d5
_F0	=	0x00d5
G$AC$0$0 == 0x00d6
_AC	=	0x00d6
G$CY$0$0 == 0x00d7
_CY	=	0x00d7
G$CCF0$0$0 == 0x00d8
_CCF0	=	0x00d8
G$CCF1$0$0 == 0x00d9
_CCF1	=	0x00d9
G$CCF2$0$0 == 0x00da
_CCF2	=	0x00da
G$CR$0$0 == 0x00de
_CR	=	0x00de
G$CF$0$0 == 0x00df
_CF	=	0x00df
G$AD0CM0$0$0 == 0x00e8
_AD0CM0	=	0x00e8
G$AD0CM1$0$0 == 0x00e9
_AD0CM1	=	0x00e9
G$AD0CM2$0$0 == 0x00ea
_AD0CM2	=	0x00ea
G$AD0WINT$0$0 == 0x00eb
_AD0WINT	=	0x00eb
G$AD0BUSY$0$0 == 0x00ec
_AD0BUSY	=	0x00ec
G$AD0INT$0$0 == 0x00ed
_AD0INT	=	0x00ed
G$AD0TM$0$0 == 0x00ee
_AD0TM	=	0x00ee
G$AD0EN$0$0 == 0x00ef
_AD0EN	=	0x00ef
G$SPIEN$0$0 == 0x00f8
_SPIEN	=	0x00f8
G$TXBMT$0$0 == 0x00f9
_TXBMT	=	0x00f9
G$NSSMD0$0$0 == 0x00fa
_NSSMD0	=	0x00fa
G$NSSMD1$0$0 == 0x00fb
_NSSMD1	=	0x00fb
G$RXOVRN$0$0 == 0x00fc
_RXOVRN	=	0x00fc
G$MODF$0$0 == 0x00fd
_MODF	=	0x00fd
G$WCOL$0$0 == 0x00fe
_WCOL	=	0x00fe
G$SPIF$0$0 == 0x00ff
_SPIF	=	0x00ff
G$LCD_RS$0$0 == 0x0080
_LCD_RS	=	0x0080
G$LCD_RW$0$0 == 0x0081
_LCD_RW	=	0x0081
G$LCD_E$0$0 == 0x0097
_LCD_E	=	0x0097
G$EEPROM_SEL$0$0 == 0x0096
_EEPROM_SEL	=	0x0096
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
	.area REG_BANK_0	(REL,OVR,DATA)
	.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
	.area DSEG    (DATA)
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
	.area	OSEG    (OVR,DATA)
Lsetup_code$page$1$1==.
_setup_code_PARM_2::
	.ds 2
Lsetup_code$byte_offset$1$1==.
_setup_code_PARM_3::
	.ds 2
	.area	OSEG    (OVR,DATA)
Lspi_write$len$1$1==.
_spi_write_PARM_2::
	.ds 2
	.area	OSEG    (OVR,DATA)
Lspi_read$len$1$1==.
_spi_read_PARM_2::
	.ds 2
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
	.area ISEG    (DATA)
;--------------------------------------------------------
; absolute internal ram data
;--------------------------------------------------------
	.area IABS    (ABS,DATA)
	.area IABS    (ABS,DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
	.area BSEG    (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
	.area PSEG    (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
	.area XSEG    (XDATA)
G$spi_ready$0$0==.
_spi_ready::
	.ds 1
G$curr_byte$0$0==.
_curr_byte::
	.ds 1
G$odometer_byte_ptr$0$0==.
_odometer_byte_ptr::
	.ds 2
G$ep$0$0==.
_ep::
	.ds 5
Linit_eeprom$temp$1$1==.
_init_eeprom_temp_1_1:
	.ds 4
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
	.area XABS    (ABS,XDATA)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG   (XDATA)
G$spi_dont_care_bytes$0$0==.
_spi_dont_care_bytes::
	.ds 4
	.area HOME    (CODE)
	.area GSINIT0 (CODE)
	.area GSINIT1 (CODE)
	.area GSINIT2 (CODE)
	.area GSINIT3 (CODE)
	.area GSINIT4 (CODE)
	.area GSINIT5 (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area CSEG    (CODE)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area HOME    (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area GSINIT  (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME    (CODE)
	.area HOME    (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG    (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'setup_code'
;------------------------------------------------------------
;page                      Allocated with name '_setup_code_PARM_2'
;byte_offset               Allocated with name '_setup_code_PARM_3'
;op                        Allocated to registers r2 
;------------------------------------------------------------
	G$setup_code$0$0 ==.
	C$eeprom.c$23$0$0 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:23: void setup_code(unsigned char op, unsigned short page, unsigned short byte_offset){
;	-----------------------------------------
;	 function setup_code
;	-----------------------------------------
_setup_code:
	ar2 = 0x02
	ar3 = 0x03
	ar4 = 0x04
	ar5 = 0x05
	ar6 = 0x06
	ar7 = 0x07
	ar0 = 0x00
	ar1 = 0x01
	mov	r2,dpl
	C$eeprom.c$24$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:24: ep.op_code = op;
	mov	dptr,#_ep
	mov	a,r2
	movx	@dptr,a
	C$eeprom.c$25$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:25: ep.page_address = page;
	mov	dptr,#(_ep + 0x0002)
	mov	a,_setup_code_PARM_2
	movx	@dptr,a
	inc	dptr
	mov	a,(_setup_code_PARM_2 + 1)
	anl	a,#0x0f
	mov	b,a
	movx	a,@dptr
	anl	a,#0xf0
	orl	a,b
	movx	@dptr,a
	C$eeprom.c$26$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:26: ep.byte_address_h = (unsigned char) ((byte_offset & 0x0300) >> 8);
	mov	a,#0x03
	anl	a,(_setup_code_PARM_3 + 1)
	mov	r2,a
	mov	dptr,#(_ep + 0x0003)
	mov	a,r2
	swap	a
	anl	a,#(0xf0&0x30)
	mov	b,a
	movx	a,@dptr
	anl	a,#0xcf
	orl	a,b
	movx	@dptr,a
	C$eeprom.c$27$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:27: ep.byte_address_l = (unsigned char) (byte_offset & 0x00FF);
	mov	r2,_setup_code_PARM_3
	mov	dptr,#(_ep + 0x0004)
	mov	a,r2
	movx	@dptr,a
	C$eeprom.c$28$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:28: ep.dont_care = 0;
	mov	dptr,#(_ep + 0x0001)
	movx	a,@dptr
	anl	a,#0xfc
	movx	@dptr,a
	C$eeprom.c$29$1$1 ==.
	XG$setup_code$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'increment_gps_ptr'
;------------------------------------------------------------
;------------------------------------------------------------
	G$increment_gps_ptr$0$0 ==.
	C$eeprom.c$32$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:32: void increment_gps_ptr(){
;	-----------------------------------------
;	 function increment_gps_ptr
;	-----------------------------------------
_increment_gps_ptr:
	C$eeprom.c$33$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:33: gps_byte_ptr += sizeof gl;
	mov	dptr,#_gps_byte_ptr
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	mov	dptr,#_gps_byte_ptr
	mov	a,#0x18
	add	a,r2
	movx	@dptr,a
	clr	a
	addc	a,r3
	inc	dptr
	movx	@dptr,a
	C$eeprom.c$34$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:34: if(gps_byte_ptr == 528){
	mov	dptr,#_gps_byte_ptr
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	cjne	r2,#0x10,00103$
	cjne	r3,#0x02,00103$
	C$eeprom.c$35$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:35: gps_byte_ptr = 0;
	mov	dptr,#_gps_byte_ptr
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	C$eeprom.c$36$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:36: gps_page_ptr++;
	mov	dptr,#_gps_page_ptr
	movx	a,@dptr
	add	a,#0x01
	movx	@dptr,a
	inc	dptr
	movx	a,@dptr
	addc	a,#0x00
	movx	@dptr,a
00103$:
	C$eeprom.c$38$2$1 ==.
	XG$increment_gps_ptr$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'init_eeprom'
;------------------------------------------------------------
;temp                      Allocated with name '_init_eeprom_temp_1_1'
;------------------------------------------------------------
	G$init_eeprom$0$0 ==.
	C$eeprom.c$42$2$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:42: void init_eeprom(){
;	-----------------------------------------
;	 function init_eeprom
;	-----------------------------------------
_init_eeprom:
	C$eeprom.c$46$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:46: gps_byte_ptr = 0;
	mov	dptr,#_gps_byte_ptr
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	C$eeprom.c$47$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:47: gps_page_ptr = GPS_MIN_PAGE;
	mov	dptr,#_gps_page_ptr
	mov	a,#0xF4
	movx	@dptr,a
	inc	dptr
	mov	a,#0x01
	movx	@dptr,a
	C$eeprom.c$50$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:50: setup_code(DIRECT_PAGE_READ, ODOMETER_PAGE, 0);
	mov	_setup_code_PARM_2,#0x05
	clr	a
	mov	(_setup_code_PARM_2 + 1),a
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0xD2
	lcall	_setup_code
	C$eeprom.c$51$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:51: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$52$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:52: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$54$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:54: spi_write(spi_dont_care_bytes, sizeof spi_dont_care_bytes);
	mov	_spi_write_PARM_2,#0x04
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_spi_dont_care_bytes
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$55$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:55: temp = 0;
	mov	dptr,#_init_eeprom_temp_1_1
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	C$eeprom.c$56$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:56: spi_read((unsigned char*)&temp, sizeof temp);
	mov	_spi_read_PARM_2,#0x04
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_init_eeprom_temp_1_1
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$57$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:57: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$59$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:59: if (temp == 0xFFFFFFFF){
	mov	dptr,#_init_eeprom_temp_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
	inc	dptr
	movx	a,@dptr
	mov	r5,a
	cjne	r2,#0xFF,00102$
	cjne	r3,#0xFF,00102$
	cjne	r4,#0xFF,00102$
	cjne	r5,#0xFF,00102$
	C$eeprom.c$60$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:60: odometer = 0;
	mov	dptr,#_odometer
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
00102$:
	C$eeprom.c$62$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:62: odometer = *((float *)&temp);
	mov	dptr,#_init_eeprom_temp_1_1
	movx	a,@dptr
	mov	r2,a
	inc	dptr
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
	inc	dptr
	movx	a,@dptr
	mov	r5,a
	mov	dptr,#_odometer
	mov	a,r2
	movx	@dptr,a
	inc	dptr
	mov	a,r3
	movx	@dptr,a
	inc	dptr
	mov	a,r4
	movx	@dptr,a
	inc	dptr
	mov	a,r5
	movx	@dptr,a
	C$eeprom.c$65$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:65: setup_code(DIRECT_PAGE_READ, LCD_PAGE, 0);
	mov	_setup_code_PARM_2,#0x01
	clr	a
	mov	(_setup_code_PARM_2 + 1),a
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0xD2
	lcall	_setup_code
	C$eeprom.c$66$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:66: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$67$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:67: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$69$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:69: spi_write(spi_dont_care_bytes, sizeof spi_dont_care_bytes);
	mov	_spi_write_PARM_2,#0x04
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_spi_dont_care_bytes
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$71$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:71: spi_read(splash, sizeof splash);
	mov	_spi_read_PARM_2,#0x50
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_splash
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$72$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:72: spi_read(back_slash, sizeof back_slash);
	mov	_spi_read_PARM_2,#0x08
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_back_slash
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$73$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:73: spi_read(degrees, sizeof degrees);
	mov	_spi_read_PARM_2,#0x08
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_degrees
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$75$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:75: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$78$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:78: setup_code(CONTINUOUS_PAGE_READ, GPS_MIN_PAGE, 0);
	mov	_setup_code_PARM_2,#0xF4
	mov	(_setup_code_PARM_2 + 1),#0x01
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0x03
	lcall	_setup_code
	C$eeprom.c$79$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:79: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$80$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:80: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$82$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:82: do{
00105$:
	C$eeprom.c$83$2$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:83: memset(&gl, 0, sizeof gl);
	mov	_memset_PARM_2,#0x00
	mov	_memset_PARM_3,#0x18
	clr	a
	mov	(_memset_PARM_3 + 1),a
	mov	dptr,#_gl
	mov	b,#0x00
	lcall	_memset
	C$eeprom.c$84$2$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:84: spi_read((unsigned char*)&gl, sizeof gl);
	mov	_spi_read_PARM_2,#0x18
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_gl
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$85$2$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:85: if(gl.header != GPS_LOG_HEADER)
	mov	dptr,#_gl
	movx	a,@dptr
	mov	r2,a
	cjne	r2,#0x69,00107$
	C$eeprom.c$87$2$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:87: increment_gps_ptr();
	lcall	_increment_gps_ptr
	C$eeprom.c$88$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:88: }while(gl.header == GPS_LOG_HEADER);
	mov	dptr,#_gl
	movx	a,@dptr
	mov	r2,a
	cjne	r2,#0x69,00117$
	sjmp	00105$
00117$:
00107$:
	C$eeprom.c$89$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:89: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$90$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:90: gps_byte_ptr = 0;
	mov	dptr,#_gps_byte_ptr
	clr	a
	movx	@dptr,a
	inc	dptr
	movx	@dptr,a
	C$eeprom.c$91$1$1 ==.
	XG$init_eeprom$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'save_gps_log'
;------------------------------------------------------------
;force_write               Allocated to registers r2 
;------------------------------------------------------------
	G$save_gps_log$0$0 ==.
	C$eeprom.c$93$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:93: void save_gps_log(unsigned char force_write){
;	-----------------------------------------
;	 function save_gps_log
;	-----------------------------------------
_save_gps_log:
	mov	r2,dpl
	C$eeprom.c$95$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:95: setup_code(WRITE_BUFFER_2, DONT_CARE, gps_byte_ptr);
	mov	dptr,#_gps_byte_ptr
	movx	a,@dptr
	mov	_setup_code_PARM_3,a
	inc	dptr
	movx	a,@dptr
	mov	(_setup_code_PARM_3 + 1),a
	clr	a
	mov	_setup_code_PARM_2,a
	mov	(_setup_code_PARM_2 + 1),a
	mov	dpl,#0x87
	push	ar2
	lcall	_setup_code
	C$eeprom.c$96$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:96: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$97$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:97: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$99$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:99: spi_write((unsigned char*)(&gl), sizeof gl); 
	mov	_spi_write_PARM_2,#0x18
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_gl
	mov	b,#0x00
	lcall	_spi_write
	pop	ar2
	C$eeprom.c$100$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:100: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$102$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:102: if(gps_byte_ptr == 528 - sizeof gl || force_write){
	mov	dptr,#_gps_byte_ptr
	movx	a,@dptr
	mov	r3,a
	inc	dptr
	movx	a,@dptr
	mov	r4,a
	cjne	r3,#0xF8,00107$
	cjne	r4,#0x01,00107$
	sjmp	00101$
00107$:
	mov	a,r2
	jz	00102$
00101$:
	C$eeprom.c$103$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:103: setup_code(BUFFER_2_TO_PAGE, gps_page_ptr, 0);
	mov	dptr,#_gps_page_ptr
	movx	a,@dptr
	mov	_setup_code_PARM_2,a
	inc	dptr
	movx	a,@dptr
	mov	(_setup_code_PARM_2 + 1),a
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0x86
	lcall	_setup_code
	C$eeprom.c$104$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:104: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$106$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:106: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$107$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:107: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
00102$:
	C$eeprom.c$109$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:109: increment_gps_ptr();
	C$eeprom.c$111$1$1 ==.
	XG$save_gps_log$0$0 ==.
	ljmp	_increment_gps_ptr
;------------------------------------------------------------
;Allocation info for local variables in function 'save_odometer'
;------------------------------------------------------------
;------------------------------------------------------------
	G$save_odometer$0$0 ==.
	C$eeprom.c$113$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:113: void save_odometer(){
;	-----------------------------------------
;	 function save_odometer
;	-----------------------------------------
_save_odometer:
	C$eeprom.c$115$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:115: setup_code(WRITE_BUFFER_1, DONT_CARE, 0);
	clr	a
	mov	_setup_code_PARM_2,a
	mov	(_setup_code_PARM_2 + 1),a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0x84
	lcall	_setup_code
	C$eeprom.c$116$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:116: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$117$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:117: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$119$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:119: spi_write((unsigned char*)(&odometer), sizeof odometer); 
	mov	_spi_write_PARM_2,#0x04
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_odometer
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$120$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:120: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$121$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:121: setup_code(BUFFER_1_TO_PAGE, ODOMETER_PAGE, 0);
	mov	_setup_code_PARM_2,#0x05
	clr	a
	mov	(_setup_code_PARM_2 + 1),a
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0x83
	lcall	_setup_code
	C$eeprom.c$122$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:122: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$124$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:124: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$125$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:125: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$126$1$1 ==.
	XG$save_odometer$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'spi_write'
;------------------------------------------------------------
;index                     Allocated with name '_spi_write_index_1_1'
;len                       Allocated with name '_spi_write_PARM_2'
;buf                       Allocated to registers r2 r3 r4 
;------------------------------------------------------------
	G$spi_write$0$0 ==.
	C$eeprom.c$129$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:129: void spi_write(unsigned char* buf, unsigned short len){
;	-----------------------------------------
;	 function spi_write
;	-----------------------------------------
_spi_write:
	mov	r2,dpl
	mov	r3,dph
	mov	r4,b
	C$eeprom.c$131$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:131: while(index < len){
	mov	r5,#0x00
00107$:
	mov	ar6,r5
	mov	r7,#0x00
	clr	c
	mov	a,r6
	subb	a,_spi_write_PARM_2
	mov	a,r7
	subb	a,(_spi_write_PARM_2 + 1)
	jnc	00110$
	C$eeprom.c$132$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:132: spi_ready = 0;
	mov	dptr,#_spi_ready
	clr	a
	movx	@dptr,a
	C$eeprom.c$133$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:133: SPI0DAT = buf[index++];
	mov	ar6,r5
	inc	r5
	mov	a,r6
	add	a,r2
	mov	r6,a
	clr	a
	addc	a,r3
	mov	r7,a
	mov	ar0,r4
	mov	dpl,r6
	mov	dph,r7
	mov	b,r0
	lcall	__gptrget
	mov	_SPI0DAT,a
	C$eeprom.c$134$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:134: while(SPIBUSY());
00101$:
	mov	a,_SPI0CFG
	jb	acc.7,00101$
	C$eeprom.c$135$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:135: while(!spi_ready);
00104$:
	mov	dptr,#_spi_ready
	movx	a,@dptr
	mov	r6,a
	jnz	00107$
	sjmp	00104$
00110$:
	C$eeprom.c$137$1$1 ==.
	XG$spi_write$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'spi_read'
;------------------------------------------------------------
;index                     Allocated with name '_spi_read_index_1_1'
;len                       Allocated with name '_spi_read_PARM_2'
;buf                       Allocated to registers r2 r3 r4 
;------------------------------------------------------------
	G$spi_read$0$0 ==.
	C$eeprom.c$140$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:140: void spi_read(unsigned char* buf, unsigned short len){
;	-----------------------------------------
;	 function spi_read
;	-----------------------------------------
_spi_read:
	mov	r2,dpl
	mov	r3,dph
	mov	r4,b
	C$eeprom.c$142$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:142: while(index < len){
	mov	r5,#0x00
00104$:
	mov	ar6,r5
	mov	r7,#0x00
	clr	c
	mov	a,r6
	subb	a,_spi_read_PARM_2
	mov	a,r7
	subb	a,(_spi_read_PARM_2 + 1)
	jnc	00107$
	C$eeprom.c$143$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:143: spi_ready = 0;
	mov	dptr,#_spi_ready
	clr	a
	movx	@dptr,a
	C$eeprom.c$144$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:144: SPI0DAT = 0x00;
	mov	_SPI0DAT,#0x00
	C$eeprom.c$145$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:145: while(!spi_ready);
00101$:
	mov	dptr,#_spi_ready
	movx	a,@dptr
	mov	r6,a
	jz	00101$
	C$eeprom.c$146$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:146: buf[index++] = curr_byte;	
	mov	ar6,r5
	inc	r5
	mov	a,r6
	add	a,r2
	mov	r6,a
	clr	a
	addc	a,r3
	mov	r7,a
	mov	ar0,r4
	mov	dptr,#_curr_byte
	movx	a,@dptr
	mov	r1,a
	mov	dpl,r6
	mov	dph,r7
	mov	b,r0
	lcall	__gptrput
	sjmp	00104$
00107$:
	C$eeprom.c$148$1$1 ==.
	XG$spi_read$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'dump_gps'
;------------------------------------------------------------
;i                         Allocated with name '_dump_gps_i_1_1'
;------------------------------------------------------------
	G$dump_gps$0$0 ==.
	C$eeprom.c$150$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:150: void dump_gps(){
;	-----------------------------------------
;	 function dump_gps
;	-----------------------------------------
_dump_gps:
	C$eeprom.c$152$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:152: setup_code(0x03, GPS_MIN_PAGE, 0);
	mov	_setup_code_PARM_2,#0xF4
	mov	(_setup_code_PARM_2 + 1),#0x01
	clr	a
	mov	_setup_code_PARM_3,a
	mov	(_setup_code_PARM_3 + 1),a
	mov	dpl,#0x03
	lcall	_setup_code
	C$eeprom.c$153$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:153: EEPROM_SEL = 0;
	clr	_EEPROM_SEL
	C$eeprom.c$154$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:154: spi_write((unsigned char *)&ep, sizeof ep);
	mov	_spi_write_PARM_2,#0x05
	clr	a
	mov	(_spi_write_PARM_2 + 1),a
	mov	dptr,#_ep
	mov	b,#0x00
	lcall	_spi_write
	C$eeprom.c$155$3$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:155: do{
00106$:
	C$eeprom.c$156$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:156: spi_read((unsigned char*)&gl, sizeof gl);
	mov	_spi_read_PARM_2,#0x18
	clr	a
	mov	(_spi_read_PARM_2 + 1),a
	mov	dptr,#_gl
	mov	b,#0x00
	lcall	_spi_read
	C$eeprom.c$157$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:157: if(gl.header != GPS_LOG_HEADER)
	mov	dptr,#_gl
	movx	a,@dptr
	mov	r2,a
	cjne	r2,#0x69,00108$
	C$eeprom.c$159$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:159: increment_gps_ptr();
	lcall	_increment_gps_ptr
	C$eeprom.c$161$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:161: for(i = 0; i < sizeof gl; i++){
	mov	r2,#0x00
00109$:
	cjne	r2,#0x18,00124$
00124$:
	jnc	00107$
	C$eeprom.c$162$3$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:162: xmitFlag = 0;
	mov	dptr,#_xmitFlag
	clr	a
	movx	@dptr,a
	C$eeprom.c$163$3$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:163: SBUF0 = ((unsigned char)&ep) + i;
	mov	r3,#_ep
	mov	a,r2
	add	a,r3
	mov	_SBUF0,a
	C$eeprom.c$165$3$3 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:165: while (!xmitFlag);
00103$:
	mov	dptr,#_xmitFlag
	movx	a,@dptr
	mov	r3,a
	jz	00103$
	C$eeprom.c$161$2$2 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:161: for(i = 0; i < sizeof gl; i++){
	inc	r2
	sjmp	00109$
00107$:
	C$eeprom.c$167$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:167: }while(gl.header == GPS_LOG_HEADER);
	mov	dptr,#_gl
	movx	a,@dptr
	mov	r2,a
	cjne	r2,#0x69,00127$
	sjmp	00106$
00127$:
00108$:
	C$eeprom.c$168$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:168: EEPROM_SEL = 1;
	setb	_EEPROM_SEL
	C$eeprom.c$169$1$1 ==.
	XG$dump_gps$0$0 ==.
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SPI_ISR'
;------------------------------------------------------------
;------------------------------------------------------------
	G$SPI_ISR$0$0 ==.
	C$eeprom.c$172$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:172: void SPI_ISR() interrupt 6{
;	-----------------------------------------
;	 function SPI_ISR
;	-----------------------------------------
_SPI_ISR:
	push	acc
	push	dpl
	push	dph
	C$eeprom.c$173$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:173: curr_byte = SPI0DAT;
	mov	dptr,#_curr_byte
	mov	a,_SPI0DAT
	movx	@dptr,a
	C$eeprom.c$174$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:174: SPIF = 0;
	clr	_SPIF
	C$eeprom.c$175$1$1 ==.
;	C:\Documents and Settings\troy\Desktop\vwgps_sdcc\vwgps\src\eeprom.c:175: spi_ready = 1;
	mov	dptr,#_spi_ready
	mov	a,#0x01
	movx	@dptr,a
	pop	dph
	pop	dpl
	pop	acc
	C$eeprom.c$176$1$1 ==.
	XG$SPI_ISR$0$0 ==.
	reti
;	eliminated unneeded push/pop psw
;	eliminated unneeded push/pop b
	.area CSEG    (CODE)
	.area CONST   (CODE)
	.area XINIT   (CODE)
Feeprom$__xinit_spi_dont_care_bytes$0$0 == .
__xinit__spi_dont_care_bytes:
	.db #0x00
	.db 0x00
	.db 0x00
	.db 0x00
	.area CABS    (ABS,CODE)
